-------------------------------------------------------------------------------
--	 File name: init.lua
--		Author: Sploder
-- 		  Date: 03/10/2010
-- Description: This file contains the "gamemode" specific stuff for the Touhou
--				SWEP system, such as a death sounds and the like.
--
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--	  Function: Initialize Hook
-- Description: This function is called when the gamemode is initialized.
-------------------------------------------------------------------------------
hook.Add( "Initialize", "TOUHOUINITHook",
	function ()
		if (CLIENT)
		then
			-- Create a custom font.
			surface.CreateFont("Cirno", ScreenScale(72), 400, true, false, "CIRNOSCALED")
			surface.CreateFont("Cirno", ScreenScale(32), 400, true, false, "CIRNOSHOTS")
		end
	end
)

-------------------------------------------------------------------------------
--	  Function: PlayerDeath Hook
-- Description: This function is called right after the player is dead.
-------------------------------------------------------------------------------
hook.Add( "PlayerDeath", "TOUHOUDEATHHook", 
	function (victim, weapon, killer)
		-- If the weapon is the touhou SWEP, play a sound.
		--if (weapon:GetClass() == "weapon_sakuya")
		--then
			victim:EmitSound("common/death.wav", 50, 100)
		--end
	end
)

-------------------------------------------------------------------------------
--	  Function: PlayerDeathSound Hook
-- Description: This function determines whether to play the default death
--				sound or not.
-------------------------------------------------------------------------------]
hook.Add("PlayerDeathSound", "TOUHOUDEATHSOUNDHook",
	function ()
		-- Disable the default death sound.
		return true
	end
)